<?php ob_start(); 
include("header.php" );
validate_user();
//Submit About//////////////////////////////////////////////
if(isset($_POST['title'])&&($_POST['title']!="")){ //print_r($_POST); die();
	$sql=mysql_query("INSERT INTO `my_page_details` SET `page_title`='".addslashes($_POST['title'])."',
												   `description`='".addslashes($_POST['description'])."',
												   `website`='".$_POST['website']."',
												   `email`='".$_POST['email']."',
												   `user_id`='".$_SESSION['id']."',
												   `url_id`='".$_SESSION['url_id']."',
												   `phone`='".$_POST['phone']."',`status` = 0
												 	")or die(mysql_error());
	if($sql){
		$_SESSION['uri']="http://mycitydial.com/".get_item('my_business_url','id',$_SESSION['url_id'],'url');
		$_SESSION['title']=$_POST['title'];
		$_SESSION['published']=1; 
	}
} 
/////////////////////////////////////////////////////////////
if(isset($_SESSION['url_id'])){ $url=get_allitem('my_business_url','id',$_SESSION['url_id']); }


?>

<!--Body Section start-->
<div class="body_div" style="margin: 0 auto; float:none;">
<div class="create_page_head">

<div id="url">
    <h1><span>http://www.mycitydial.com/<?php if(isset($url['url'])){ echo cut_text($url['url'],75);} ?></span>
     <input type="text" class="long_box" value="<?php if(isset($url['url'])){ echo cut_text($url['url'],75);} ?>" style="width:400px" />
    </h1>
    <input type="hidden" id="urlid" value="<?php if(isset($url['id'])){ echo $url['id'];} ?>" />
    <a href="javascript:;" id="urledit">+Edit</a><span id='msg' style='color:red;'></span>
</div> 
 </div>

<!--Create page Steps div start-->
<div class="steps_div">
<div class="steps">
 <ul>
<li><a href="#" class="current">
<div>
<img src="images/steps/1_black.png" />
<img src="images/steps/1.png" />
<span>Home Page</span>
</div>
</a></li>

<li><a href="#" class="current">
<div>
<img src="images/steps/02.png" />
<img src="images/steps/2.png" />
<span>Page Gallery</span>
</div>
</a></li>

<li><a href="#"  class="current">
<div>
<img src="images/steps/03.png" />
<img src="images/steps/3.png" />
<span>About Page</span>
</div>
</a></li>

<li><a href="#"  class="active">
<div>
<img src="images/steps/4_black.png" />
<img src="images/steps/4.png" />
<span>Owner Profile </span>
</div>
</a></li>
</ul>
</div>
<ul id="output2">
 
 

<li>
<div class="header_navi"> 
  <h2>Complete  your Profile</h2>
  <div class="btn"> 
    <div class="nextprev">
     <a href="create_page_step3.php"><img src="images/prev.png"  /></a>
<a href="#" class="inactive"><img src="images/next.png"  /></a>     
    </div>
    
    <div class="nextstep"><a href="#" class="inputbtn" id="btnstep4">Save and Publsh</a></div>
    
  </div>
  
</div>
<?php if(isset($_SESSION['msg'])){ ?>
<div style="text-align:center; color:#F00; font-size:16px;"><?php echo $_SESSION['msg']; unset($_SESSION['msg']); ?></div>
<?php }?>
<?php if(isset($_SESSION['url_id'])){ $url=get_allitem('my_url','url_id',$_SESSION['url_id'],'url'); } ?>
<form action="" method="post" enctype="multipart/form-data" id="about_form">
<div class="about_form">

<dl>
<dt>Meta Title</dt>
<dd><input name="title" type="text" class="long_box"  value="<?php if(isset($_POST['title'])){ echo $_POST['title'];} ?>"  />
</dd>
</dl>

<dl class="tip">
<dt>Tip: Add a description and website to improve the ranking of your page in search.</dt>
<dd><textarea class="tips_area" name="description" ><?php if(isset($_POST['description'])){ echo $_POST['description'];} ?></textarea></dd>
</dl>

<dl>
<dt>Website </dt>
<dd><input name="website" type="text" class="long_box" value="<?php if(isset($_POST['website'])){ echo $_POST['website'];} ?>"  />
</dd>
</dl>

<dl>
<dt>Email Address</dt>
<dd><input name="email" type="text" class="long_box"  value="<?php if(isset($_POST['email'])){ echo $_POST['email'];} ?>"  />
</dd>
</dl>

<dl>
<dt>Phone number</dt>
<dd><input name="phone" type="text" class="phone_box"  value="<?php if(isset($_POST['phone'])){ echo $_POST['phone'];} ?>" />
</dd>
</dl>



<dl>
<dt>&nbsp;</dt>
<dd><input name="agree" type="checkbox" style="float:left;" value="1"  /> <span class="agree">I am Agree with this <a href="#">Tearms &amp; condtions</a></span></dd>
</dl>

<dl>
<dt>&nbsp;</dt>
<dd><input name="Submit_about" type="submit" value="Publish" class="inputbtn"   /></dd>
</dl>

</div>
</form>
</li>

</ul>
</div>
<!--Create page Steps div end-->
<br clear="all" />
<br clear="all" />
</div>
  <?php include("footer.php");  ?>

